using Domain.Entities;
using Domain.Services;
using System;
using System.Web.UI;
using UserInterface.Misc;

namespace UserInterface
{
    public partial class MyPanel : BoardPageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            User user = CurrentSession.User;
            if (user != null)
            {
                LastMessagesRepeater.DataSource = MessageService.GetLastMessagesByUserId(user.Id);
                LastMessagesRepeater.DataBind();
            }
            
            string pageTitle = (string)GetLocalResourceObject("Title");
            MasterPage.TitleGenerator.PageTitle = pageTitle;
            MasterPage.HeaderText = pageTitle;

            MasterPage.AddPathItem("My Panel", "MyPanel.aspx");
        }
    }
}
